package wo.esys.util;

import java.util.Map;

import wo.esys.exception.ESysException;
import wo.esys.vo.WoUser;

public class ESysUtil {

	/**
	 * 获取session中的用户数据
	 * @param map
	 * @return
	 */
	public static WoUser getCurrentUser (Map<String, Object>map) {
		WoUser u = (WoUser)map.get(ESysConstant.SESSION_USER);
		if (u == null) {
			throw new ESysException (ESysConstant.ERR_LOGIN);
		}
		return u;
	}
}
